<?php

defined("_ARKN_EXEC") or exit("no no, mr. superman no here");
($_SESSION["roleid"] == Roles::Secretary) or exit("you almost got away with it");
$departmentid = $_POST["departmentid"];
$coursename = $_POST["coursename"];
$credits = $_POST["credits"];

require_once "Course.php";
if($course->addCourse($departmentid, $coursename, $credits)) {
	$successMessage = "Course has been added successfully.";
	require ROOT_FOLDER . "/php/pages/operation_successful.php";
} else {
	$errorMessage = "Course could not be be added.";
	require ROOT_FOLDER . "/php/pages/operation_unsuccessful.php";
}
?>